/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shift.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.modules.schedul.entity.Schclass;
import com.thinkgem.jeesite.modules.sys.entity.Office;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 班次Entity
 * @author hui.li
 * @version 2017-07-22
 */
public class Shift extends DataEntity<Shift> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 班次名称
	private Date startdate;		// 开始时间
	private Date enddate;		// 结束时间
	private String week;		// 日期
    private Schclass schclass;// 关联时段表ID

	private String schclassName;//
	private Office company; // 归属公司
	private Office office;  // 归属部门
	private Date beginStartdate;		// 开始 开始时间
	private Date endStartdate;		// 结束 开始时间
	
	private List<String> weekList;

	public Shift() {
		super();
	}

	public Shift(String id){
		super(id);
	}

	@Length(min=1, max=100, message="班次名称长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="开始时间不能为空")
	public Date getStartdate() {
		return startdate;
	}

	public void setStartdate(Date startdate) {
		this.startdate = startdate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="结束时间不能为空")
	public Date getEnddate() {
		return enddate;
	}

	public void setEnddate(Date enddate) {
		this.enddate = enddate;
	}
	
	@Length(min=1, max=64, message="日期长度必须介于 1 和 64 之间")
	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}
	
	
	
	@JsonIgnore
    @NotNull(message="归属公司不能为空")
    @ExcelField(title="归属公司", align=2, sort=20)
    public Office getCompany() {
        return company;
    }

    public void setCompany(Office company) {
        this.company = company;
    }
    
    @JsonIgnore
    @NotNull(message="归属部门不能为空")
    @ExcelField(title="归属部门", align=2, sort=25)
    public Office getOffice() {
        return office;
    }

    public void setOffice(Office office) {
        this.office = office;
    }
    
    @JsonIgnore
    @NotNull(message="时段不能为空")
    public Schclass getSchclass() {
		return schclass;
	}

	public void setSchclass(Schclass schclass) {
		this.schclass = schclass;
	}
	
	
	public Date getBeginStartdate() {
		return beginStartdate;
	}

	public void setBeginStartdate(Date beginStartdate) {
		this.beginStartdate = beginStartdate;
	}
	
	public Date getEndStartdate() {
		return endStartdate;
	}

	public void setEndStartdate(Date endStartdate) {
		this.endStartdate = endStartdate;
	}
    public String getSchclassName() {
		return schclassName;
	}

	public void setSchclassName(String schclassName) {
		this.schclassName = schclassName;
	}

    public List<String> getWeekList() {
        return weekList;
    }

    public void setWeekList(List<String> weekList) {
        this.weekList = weekList;
    }

}